﻿
/*
'===============================================================================
'  Generated From - CSharp_dOOdads_BusinessEntity.vbgen
' 
'  ** IMPORTANT  ** 
'  How to Generate your stored procedures:
' 
'  SQL        = SQL_StoredProcs.vbgen
'  ACCESS     = Access_StoredProcs.vbgen
'  ORACLE     = Oracle_StoredProcs.vbgen
'  FIREBIRD   = FirebirdStoredProcs.vbgen
'  POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
'  The supporting base class OleDbEntity is in the Architecture directory in "dOOdads".
'  
'  This object is 'abstract' which means you need to inherit from it to be able
'  to instantiate it.  This is very easilly done. You can override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code. 
'
'  NEVER EDIT THIS FILE.
'
'  public class YourObject :  _YourObject
'  {
'
'  }
'
'===============================================================================
*/

// Generated by MyGeneration Version # (1.2.0.7)

using System;
using System.Data;
using System.Data.OleDb;
using System.Collections;
using System.Collections.Specialized;

using MyGeneration.dOOdads;

namespace pub.pur
{
	public abstract class _Content : OleDbEntity
	{
		public _Content()
		{
			this.QuerySource = "Content";
			this.MappingName = "Content";

		}	

		//=================================================================
		//  public Overrides void AddNew()
		//=================================================================
		//
		//=================================================================
		public override void AddNew()
		{
			base.AddNew();
			
		}
		
		
		public override string GetAutoKeyColumn()
		{
			return "ID";
		}

		public override void FlushData()
		{
			this._whereClause = null;
			this._aggregateClause = null;
			base.FlushData();
		}
		
		//=================================================================
		//  	public Function LoadAll() As Boolean
		//=================================================================
		//  Loads all of the records in the database, and sets the currentRow to the first row
		//=================================================================
		public bool LoadAll() 
		{
			ListDictionary parameters = null;
			
			return base.LoadFromSql("[" + this.SchemaStoredProcedure + "proc_ContentLoadAll]", parameters);
		}
	
		//=================================================================
		// public Overridable Function LoadByPrimaryKey()  As Boolean
		//=================================================================
		//  Loads a single row of via the primary key
		//=================================================================
		public virtual bool LoadByPrimaryKey(int ID)
		{
			ListDictionary parameters = new ListDictionary();
			parameters.Add(Parameters.ID, ID);

		
			return base.LoadFromSql("[" + this.SchemaStoredProcedure + "proc_ContentLoadByPrimaryKey]", parameters);
		}
		
		#region Parameters
		protected class Parameters
		{
			
			public static OleDbParameter ID
			{
				get
				{
					return new OleDbParameter("@ID", OleDbType.Numeric, 0);
				}
			}
			
			public static OleDbParameter 已采
			{
				get
				{
					return new OleDbParameter("@已采", OleDbType.Boolean, 2);
				}
			}
			
			public static OleDbParameter 已发
			{
				get
				{
					return new OleDbParameter("@已发", OleDbType.Boolean, 2);
				}
			}
			
			public static OleDbParameter LoginName
			{
				get
				{
					return new OleDbParameter("@LoginName", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter Info
			{
				get
				{
					return new OleDbParameter("@Info", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter Picture_1
			{
				get
				{
					return new OleDbParameter("@Picture_1", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter LinkName
			{
				get
				{
					return new OleDbParameter("@LinkName", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter Postcode
			{
				get
				{
					return new OleDbParameter("@Postcode", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter Address
			{
				get
				{
					return new OleDbParameter("@Address", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter CompaneyName
			{
				get
				{
					return new OleDbParameter("@CompaneyName", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter IndType
			{
				get
				{
					return new OleDbParameter("@IndType", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter Name
			{
				get
				{
					return new OleDbParameter("@Name", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter Key
			{
				get
				{
					return new OleDbParameter("@Key", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter StartDate
			{
				get
				{
					return new OleDbParameter("@StartDate", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter EndDate
			{
				get
				{
					return new OleDbParameter("@EndDate", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 缩略图
			{
				get
				{
					return new OleDbParameter("@缩略图", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter PageUrl
			{
				get
				{
					return new OleDbParameter("@PageUrl", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 处理中
			{
				get
				{
					return new OleDbParameter("@处理中", OleDbType.Boolean, 2);
				}
			}
			
		}
		#endregion		
	
		#region ColumnNames
		public class ColumnNames
		{  
            public const string ID = "ID";
            public const string 已采 = "已采";
            public const string 已发 = "已发";
            public const string LoginName = "LoginName";
            public const string Info = "info";
            public const string Picture_1 = "Picture_1";
            public const string LinkName = "LinkName";
            public const string Postcode = "postcode";
            public const string Address = "address";
            public const string CompaneyName = "CompaneyName";
            public const string IndType = "IndType";
            public const string Name = "Name";
            public const string Key = "key";
            public const string StartDate = "StartDate";
            public const string EndDate = "EndDate";
            public const string 缩略图 = "缩略图";
            public const string PageUrl = "PageUrl";
            public const string 处理中 = "处理中";

			static public string ToPropertyName(string columnName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[ID] = _Content.PropertyNames.ID;
					ht[已采] = _Content.PropertyNames.已采;
					ht[已发] = _Content.PropertyNames.已发;
					ht[LoginName] = _Content.PropertyNames.LoginName;
					ht[Info] = _Content.PropertyNames.Info;
					ht[Picture_1] = _Content.PropertyNames.Picture_1;
					ht[LinkName] = _Content.PropertyNames.LinkName;
					ht[Postcode] = _Content.PropertyNames.Postcode;
					ht[Address] = _Content.PropertyNames.Address;
					ht[CompaneyName] = _Content.PropertyNames.CompaneyName;
					ht[IndType] = _Content.PropertyNames.IndType;
					ht[Name] = _Content.PropertyNames.Name;
					ht[Key] = _Content.PropertyNames.Key;
					ht[StartDate] = _Content.PropertyNames.StartDate;
					ht[EndDate] = _Content.PropertyNames.EndDate;
					ht[缩略图] = _Content.PropertyNames.缩略图;
					ht[PageUrl] = _Content.PropertyNames.PageUrl;
					ht[处理中] = _Content.PropertyNames.处理中;

				}
				return (string)ht[columnName];
			}

			static private Hashtable ht = null;			 
		}
		#endregion
		
		#region PropertyNames
		public class PropertyNames
		{  
            public const string ID = "ID";
            public const string 已采 = "已采";
            public const string 已发 = "已发";
            public const string LoginName = "LoginName";
            public const string Info = "Info";
            public const string Picture_1 = "Picture_1";
            public const string LinkName = "LinkName";
            public const string Postcode = "Postcode";
            public const string Address = "Address";
            public const string CompaneyName = "CompaneyName";
            public const string IndType = "IndType";
            public const string Name = "Name";
            public const string Key = "Key";
            public const string StartDate = "StartDate";
            public const string EndDate = "EndDate";
            public const string 缩略图 = "缩略图";
            public const string PageUrl = "PageUrl";
            public const string 处理中 = "处理中";

			static public string ToColumnName(string propertyName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[ID] = _Content.ColumnNames.ID;
					ht[已采] = _Content.ColumnNames.已采;
					ht[已发] = _Content.ColumnNames.已发;
					ht[LoginName] = _Content.ColumnNames.LoginName;
					ht[Info] = _Content.ColumnNames.Info;
					ht[Picture_1] = _Content.ColumnNames.Picture_1;
					ht[LinkName] = _Content.ColumnNames.LinkName;
					ht[Postcode] = _Content.ColumnNames.Postcode;
					ht[Address] = _Content.ColumnNames.Address;
					ht[CompaneyName] = _Content.ColumnNames.CompaneyName;
					ht[IndType] = _Content.ColumnNames.IndType;
					ht[Name] = _Content.ColumnNames.Name;
					ht[Key] = _Content.ColumnNames.Key;
					ht[StartDate] = _Content.ColumnNames.StartDate;
					ht[EndDate] = _Content.ColumnNames.EndDate;
					ht[缩略图] = _Content.ColumnNames.缩略图;
					ht[PageUrl] = _Content.ColumnNames.PageUrl;
					ht[处理中] = _Content.ColumnNames.处理中;

				}
				return (string)ht[propertyName];
			}

			static private Hashtable ht = null;			 
		}			 
		#endregion	

		#region StringPropertyNames
		public class StringPropertyNames
		{  
            public const string ID = "s_ID";
            public const string 已采 = "s_已采";
            public const string 已发 = "s_已发";
            public const string LoginName = "s_LoginName";
            public const string Info = "s_Info";
            public const string Picture_1 = "s_Picture_1";
            public const string LinkName = "s_LinkName";
            public const string Postcode = "s_Postcode";
            public const string Address = "s_Address";
            public const string CompaneyName = "s_CompaneyName";
            public const string IndType = "s_IndType";
            public const string Name = "s_Name";
            public const string Key = "s_Key";
            public const string StartDate = "s_StartDate";
            public const string EndDate = "s_EndDate";
            public const string 缩略图 = "s_缩略图";
            public const string PageUrl = "s_PageUrl";
            public const string 处理中 = "s_处理中";

		}
		#endregion		
		
		#region Properties
	
		public virtual int ID
	    {
			get
	        {
				return base.Getint(ColumnNames.ID);
			}
			set
	        {
				base.Setint(ColumnNames.ID, value);
			}
		}

		public virtual bool 已采
	    {
			get
	        {
				return base.Getbool(ColumnNames.已采);
			}
			set
	        {
				base.Setbool(ColumnNames.已采, value);
			}
		}

		public virtual bool 已发
	    {
			get
	        {
				return base.Getbool(ColumnNames.已发);
			}
			set
	        {
				base.Setbool(ColumnNames.已发, value);
			}
		}

		public virtual string LoginName
	    {
			get
	        {
				return base.Getstring(ColumnNames.LoginName);
			}
			set
	        {
				base.Setstring(ColumnNames.LoginName, value);
			}
		}

		public virtual string Info
	    {
			get
	        {
				return base.Getstring(ColumnNames.Info);
			}
			set
	        {
				base.Setstring(ColumnNames.Info, value);
			}
		}

		public virtual string Picture_1
	    {
			get
	        {
				return base.Getstring(ColumnNames.Picture_1);
			}
			set
	        {
				base.Setstring(ColumnNames.Picture_1, value);
			}
		}

		public virtual string LinkName
	    {
			get
	        {
				return base.Getstring(ColumnNames.LinkName);
			}
			set
	        {
				base.Setstring(ColumnNames.LinkName, value);
			}
		}

		public virtual string Postcode
	    {
			get
	        {
				return base.Getstring(ColumnNames.Postcode);
			}
			set
	        {
				base.Setstring(ColumnNames.Postcode, value);
			}
		}

		public virtual string Address
	    {
			get
	        {
				return base.Getstring(ColumnNames.Address);
			}
			set
	        {
				base.Setstring(ColumnNames.Address, value);
			}
		}

		public virtual string CompaneyName
	    {
			get
	        {
				return base.Getstring(ColumnNames.CompaneyName);
			}
			set
	        {
				base.Setstring(ColumnNames.CompaneyName, value);
			}
		}

		public virtual string IndType
	    {
			get
	        {
				return base.Getstring(ColumnNames.IndType);
			}
			set
	        {
				base.Setstring(ColumnNames.IndType, value);
			}
		}

		public virtual string Name
	    {
			get
	        {
				return base.Getstring(ColumnNames.Name);
			}
			set
	        {
				base.Setstring(ColumnNames.Name, value);
			}
		}

		public virtual string Key
	    {
			get
	        {
				return base.Getstring(ColumnNames.Key);
			}
			set
	        {
				base.Setstring(ColumnNames.Key, value);
			}
		}

		public virtual string StartDate
	    {
			get
	        {
				return base.Getstring(ColumnNames.StartDate);
			}
			set
	        {
				base.Setstring(ColumnNames.StartDate, value);
			}
		}

		public virtual string EndDate
	    {
			get
	        {
				return base.Getstring(ColumnNames.EndDate);
			}
			set
	        {
				base.Setstring(ColumnNames.EndDate, value);
			}
		}

		public virtual string 缩略图
	    {
			get
	        {
				return base.Getstring(ColumnNames.缩略图);
			}
			set
	        {
				base.Setstring(ColumnNames.缩略图, value);
			}
		}

		public virtual string PageUrl
	    {
			get
	        {
				return base.Getstring(ColumnNames.PageUrl);
			}
			set
	        {
				base.Setstring(ColumnNames.PageUrl, value);
			}
		}

		public virtual bool 处理中
	    {
			get
	        {
				return base.Getbool(ColumnNames.处理中);
			}
			set
	        {
				base.Setbool(ColumnNames.处理中, value);
			}
		}


		#endregion
		
		#region String Properties
	
		public virtual string s_ID
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.ID) ? string.Empty : base.GetintAsString(ColumnNames.ID);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.ID);
				else
					this.ID = base.SetintAsString(ColumnNames.ID, value);
			}
		}

		public virtual string s_已采
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.已采) ? string.Empty : base.GetboolAsString(ColumnNames.已采);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.已采);
				else
					this.已采 = base.SetboolAsString(ColumnNames.已采, value);
			}
		}

		public virtual string s_已发
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.已发) ? string.Empty : base.GetboolAsString(ColumnNames.已发);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.已发);
				else
					this.已发 = base.SetboolAsString(ColumnNames.已发, value);
			}
		}

		public virtual string s_LoginName
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.LoginName) ? string.Empty : base.GetstringAsString(ColumnNames.LoginName);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.LoginName);
				else
					this.LoginName = base.SetstringAsString(ColumnNames.LoginName, value);
			}
		}

		public virtual string s_Info
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Info) ? string.Empty : base.GetstringAsString(ColumnNames.Info);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Info);
				else
					this.Info = base.SetstringAsString(ColumnNames.Info, value);
			}
		}

		public virtual string s_Picture_1
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Picture_1) ? string.Empty : base.GetstringAsString(ColumnNames.Picture_1);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Picture_1);
				else
					this.Picture_1 = base.SetstringAsString(ColumnNames.Picture_1, value);
			}
		}

		public virtual string s_LinkName
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.LinkName) ? string.Empty : base.GetstringAsString(ColumnNames.LinkName);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.LinkName);
				else
					this.LinkName = base.SetstringAsString(ColumnNames.LinkName, value);
			}
		}

		public virtual string s_Postcode
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Postcode) ? string.Empty : base.GetstringAsString(ColumnNames.Postcode);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Postcode);
				else
					this.Postcode = base.SetstringAsString(ColumnNames.Postcode, value);
			}
		}

		public virtual string s_Address
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Address) ? string.Empty : base.GetstringAsString(ColumnNames.Address);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Address);
				else
					this.Address = base.SetstringAsString(ColumnNames.Address, value);
			}
		}

		public virtual string s_CompaneyName
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.CompaneyName) ? string.Empty : base.GetstringAsString(ColumnNames.CompaneyName);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.CompaneyName);
				else
					this.CompaneyName = base.SetstringAsString(ColumnNames.CompaneyName, value);
			}
		}

		public virtual string s_IndType
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.IndType) ? string.Empty : base.GetstringAsString(ColumnNames.IndType);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.IndType);
				else
					this.IndType = base.SetstringAsString(ColumnNames.IndType, value);
			}
		}

		public virtual string s_Name
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Name) ? string.Empty : base.GetstringAsString(ColumnNames.Name);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Name);
				else
					this.Name = base.SetstringAsString(ColumnNames.Name, value);
			}
		}

		public virtual string s_Key
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Key) ? string.Empty : base.GetstringAsString(ColumnNames.Key);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Key);
				else
					this.Key = base.SetstringAsString(ColumnNames.Key, value);
			}
		}

		public virtual string s_StartDate
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.StartDate) ? string.Empty : base.GetstringAsString(ColumnNames.StartDate);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.StartDate);
				else
					this.StartDate = base.SetstringAsString(ColumnNames.StartDate, value);
			}
		}

		public virtual string s_EndDate
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.EndDate) ? string.Empty : base.GetstringAsString(ColumnNames.EndDate);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.EndDate);
				else
					this.EndDate = base.SetstringAsString(ColumnNames.EndDate, value);
			}
		}

		public virtual string s_缩略图
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.缩略图) ? string.Empty : base.GetstringAsString(ColumnNames.缩略图);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.缩略图);
				else
					this.缩略图 = base.SetstringAsString(ColumnNames.缩略图, value);
			}
		}

		public virtual string s_PageUrl
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.PageUrl) ? string.Empty : base.GetstringAsString(ColumnNames.PageUrl);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.PageUrl);
				else
					this.PageUrl = base.SetstringAsString(ColumnNames.PageUrl, value);
			}
		}

		public virtual string s_处理中
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.处理中) ? string.Empty : base.GetboolAsString(ColumnNames.处理中);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.处理中);
				else
					this.处理中 = base.SetboolAsString(ColumnNames.处理中, value);
			}
		}


		#endregion		
	
		#region Where Clause
		public class WhereClause
		{
			public WhereClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffWhereParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffWhereParameter(this);
					}

					return _tearOff;
				}
			}

			#region WhereParameter TearOff's
			public class TearOffWhereParameter
			{
				public TearOffWhereParameter(WhereClause clause)
				{
					this._clause = clause;
				}
				
				
				public WhereParameter ID
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.ID, Parameters.ID);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 已采
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.已采, Parameters.已采);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 已发
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.已发, Parameters.已发);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter LoginName
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.LoginName, Parameters.LoginName);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Info
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Info, Parameters.Info);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Picture_1
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Picture_1, Parameters.Picture_1);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter LinkName
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.LinkName, Parameters.LinkName);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Postcode
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Postcode, Parameters.Postcode);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Address
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Address, Parameters.Address);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter CompaneyName
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.CompaneyName, Parameters.CompaneyName);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter IndType
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.IndType, Parameters.IndType);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Name
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Name, Parameters.Name);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Key
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Key, Parameters.Key);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter StartDate
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.StartDate, Parameters.StartDate);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter EndDate
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.EndDate, Parameters.EndDate);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 缩略图
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.缩略图, Parameters.缩略图);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter PageUrl
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.PageUrl, Parameters.PageUrl);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 处理中
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.处理中, Parameters.处理中);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}


				private WhereClause _clause;
			}
			#endregion
		
			public WhereParameter ID
		    {
				get
		        {
					if(_ID_W == null)
	        	    {
						_ID_W = TearOff.ID;
					}
					return _ID_W;
				}
			}

			public WhereParameter 已采
		    {
				get
		        {
					if(_已采_W == null)
	        	    {
						_已采_W = TearOff.已采;
					}
					return _已采_W;
				}
			}

			public WhereParameter 已发
		    {
				get
		        {
					if(_已发_W == null)
	        	    {
						_已发_W = TearOff.已发;
					}
					return _已发_W;
				}
			}

			public WhereParameter LoginName
		    {
				get
		        {
					if(_LoginName_W == null)
	        	    {
						_LoginName_W = TearOff.LoginName;
					}
					return _LoginName_W;
				}
			}

			public WhereParameter Info
		    {
				get
		        {
					if(_Info_W == null)
	        	    {
						_Info_W = TearOff.Info;
					}
					return _Info_W;
				}
			}

			public WhereParameter Picture_1
		    {
				get
		        {
					if(_Picture_1_W == null)
	        	    {
						_Picture_1_W = TearOff.Picture_1;
					}
					return _Picture_1_W;
				}
			}

			public WhereParameter LinkName
		    {
				get
		        {
					if(_LinkName_W == null)
	        	    {
						_LinkName_W = TearOff.LinkName;
					}
					return _LinkName_W;
				}
			}

			public WhereParameter Postcode
		    {
				get
		        {
					if(_Postcode_W == null)
	        	    {
						_Postcode_W = TearOff.Postcode;
					}
					return _Postcode_W;
				}
			}

			public WhereParameter Address
		    {
				get
		        {
					if(_Address_W == null)
	        	    {
						_Address_W = TearOff.Address;
					}
					return _Address_W;
				}
			}

			public WhereParameter CompaneyName
		    {
				get
		        {
					if(_CompaneyName_W == null)
	        	    {
						_CompaneyName_W = TearOff.CompaneyName;
					}
					return _CompaneyName_W;
				}
			}

			public WhereParameter IndType
		    {
				get
		        {
					if(_IndType_W == null)
	        	    {
						_IndType_W = TearOff.IndType;
					}
					return _IndType_W;
				}
			}

			public WhereParameter Name
		    {
				get
		        {
					if(_Name_W == null)
	        	    {
						_Name_W = TearOff.Name;
					}
					return _Name_W;
				}
			}

			public WhereParameter Key
		    {
				get
		        {
					if(_Key_W == null)
	        	    {
						_Key_W = TearOff.Key;
					}
					return _Key_W;
				}
			}

			public WhereParameter StartDate
		    {
				get
		        {
					if(_StartDate_W == null)
	        	    {
						_StartDate_W = TearOff.StartDate;
					}
					return _StartDate_W;
				}
			}

			public WhereParameter EndDate
		    {
				get
		        {
					if(_EndDate_W == null)
	        	    {
						_EndDate_W = TearOff.EndDate;
					}
					return _EndDate_W;
				}
			}

			public WhereParameter 缩略图
		    {
				get
		        {
					if(_缩略图_W == null)
	        	    {
						_缩略图_W = TearOff.缩略图;
					}
					return _缩略图_W;
				}
			}

			public WhereParameter PageUrl
		    {
				get
		        {
					if(_PageUrl_W == null)
	        	    {
						_PageUrl_W = TearOff.PageUrl;
					}
					return _PageUrl_W;
				}
			}

			public WhereParameter 处理中
		    {
				get
		        {
					if(_处理中_W == null)
	        	    {
						_处理中_W = TearOff.处理中;
					}
					return _处理中_W;
				}
			}

			private WhereParameter _ID_W = null;
			private WhereParameter _已采_W = null;
			private WhereParameter _已发_W = null;
			private WhereParameter _LoginName_W = null;
			private WhereParameter _Info_W = null;
			private WhereParameter _Picture_1_W = null;
			private WhereParameter _LinkName_W = null;
			private WhereParameter _Postcode_W = null;
			private WhereParameter _Address_W = null;
			private WhereParameter _CompaneyName_W = null;
			private WhereParameter _IndType_W = null;
			private WhereParameter _Name_W = null;
			private WhereParameter _Key_W = null;
			private WhereParameter _StartDate_W = null;
			private WhereParameter _EndDate_W = null;
			private WhereParameter _缩略图_W = null;
			private WhereParameter _PageUrl_W = null;
			private WhereParameter _处理中_W = null;

			public void WhereClauseReset()
			{
				_ID_W = null;
				_已采_W = null;
				_已发_W = null;
				_LoginName_W = null;
				_Info_W = null;
				_Picture_1_W = null;
				_LinkName_W = null;
				_Postcode_W = null;
				_Address_W = null;
				_CompaneyName_W = null;
				_IndType_W = null;
				_Name_W = null;
				_Key_W = null;
				_StartDate_W = null;
				_EndDate_W = null;
				_缩略图_W = null;
				_PageUrl_W = null;
				_处理中_W = null;

				this._entity.Query.FlushWhereParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffWhereParameter _tearOff;
			
		}
	
		public WhereClause Where
		{
			get
			{
				if(_whereClause == null)
				{
					_whereClause = new WhereClause(this);
				}
		
				return _whereClause;
			}
		}
		
		private WhereClause _whereClause = null;	
		#endregion
	
		#region Aggregate Clause
		public class AggregateClause
		{
			public AggregateClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffAggregateParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffAggregateParameter(this);
					}

					return _tearOff;
				}
			}

			#region AggregateParameter TearOff's
			public class TearOffAggregateParameter
			{
				public TearOffAggregateParameter(AggregateClause clause)
				{
					this._clause = clause;
				}
				
				
				public AggregateParameter ID
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.ID, Parameters.ID);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 已采
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.已采, Parameters.已采);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 已发
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.已发, Parameters.已发);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter LoginName
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.LoginName, Parameters.LoginName);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Info
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Info, Parameters.Info);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Picture_1
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Picture_1, Parameters.Picture_1);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter LinkName
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.LinkName, Parameters.LinkName);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Postcode
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Postcode, Parameters.Postcode);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Address
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Address, Parameters.Address);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter CompaneyName
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.CompaneyName, Parameters.CompaneyName);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter IndType
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.IndType, Parameters.IndType);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Name
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Name, Parameters.Name);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Key
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Key, Parameters.Key);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter StartDate
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.StartDate, Parameters.StartDate);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter EndDate
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.EndDate, Parameters.EndDate);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 缩略图
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.缩略图, Parameters.缩略图);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter PageUrl
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.PageUrl, Parameters.PageUrl);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 处理中
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.处理中, Parameters.处理中);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}


				private AggregateClause _clause;
			}
			#endregion
		
			public AggregateParameter ID
		    {
				get
		        {
					if(_ID_W == null)
	        	    {
						_ID_W = TearOff.ID;
					}
					return _ID_W;
				}
			}

			public AggregateParameter 已采
		    {
				get
		        {
					if(_已采_W == null)
	        	    {
						_已采_W = TearOff.已采;
					}
					return _已采_W;
				}
			}

			public AggregateParameter 已发
		    {
				get
		        {
					if(_已发_W == null)
	        	    {
						_已发_W = TearOff.已发;
					}
					return _已发_W;
				}
			}

			public AggregateParameter LoginName
		    {
				get
		        {
					if(_LoginName_W == null)
	        	    {
						_LoginName_W = TearOff.LoginName;
					}
					return _LoginName_W;
				}
			}

			public AggregateParameter Info
		    {
				get
		        {
					if(_Info_W == null)
	        	    {
						_Info_W = TearOff.Info;
					}
					return _Info_W;
				}
			}

			public AggregateParameter Picture_1
		    {
				get
		        {
					if(_Picture_1_W == null)
	        	    {
						_Picture_1_W = TearOff.Picture_1;
					}
					return _Picture_1_W;
				}
			}

			public AggregateParameter LinkName
		    {
				get
		        {
					if(_LinkName_W == null)
	        	    {
						_LinkName_W = TearOff.LinkName;
					}
					return _LinkName_W;
				}
			}

			public AggregateParameter Postcode
		    {
				get
		        {
					if(_Postcode_W == null)
	        	    {
						_Postcode_W = TearOff.Postcode;
					}
					return _Postcode_W;
				}
			}

			public AggregateParameter Address
		    {
				get
		        {
					if(_Address_W == null)
	        	    {
						_Address_W = TearOff.Address;
					}
					return _Address_W;
				}
			}

			public AggregateParameter CompaneyName
		    {
				get
		        {
					if(_CompaneyName_W == null)
	        	    {
						_CompaneyName_W = TearOff.CompaneyName;
					}
					return _CompaneyName_W;
				}
			}

			public AggregateParameter IndType
		    {
				get
		        {
					if(_IndType_W == null)
	        	    {
						_IndType_W = TearOff.IndType;
					}
					return _IndType_W;
				}
			}

			public AggregateParameter Name
		    {
				get
		        {
					if(_Name_W == null)
	        	    {
						_Name_W = TearOff.Name;
					}
					return _Name_W;
				}
			}

			public AggregateParameter Key
		    {
				get
		        {
					if(_Key_W == null)
	        	    {
						_Key_W = TearOff.Key;
					}
					return _Key_W;
				}
			}

			public AggregateParameter StartDate
		    {
				get
		        {
					if(_StartDate_W == null)
	        	    {
						_StartDate_W = TearOff.StartDate;
					}
					return _StartDate_W;
				}
			}

			public AggregateParameter EndDate
		    {
				get
		        {
					if(_EndDate_W == null)
	        	    {
						_EndDate_W = TearOff.EndDate;
					}
					return _EndDate_W;
				}
			}

			public AggregateParameter 缩略图
		    {
				get
		        {
					if(_缩略图_W == null)
	        	    {
						_缩略图_W = TearOff.缩略图;
					}
					return _缩略图_W;
				}
			}

			public AggregateParameter PageUrl
		    {
				get
		        {
					if(_PageUrl_W == null)
	        	    {
						_PageUrl_W = TearOff.PageUrl;
					}
					return _PageUrl_W;
				}
			}

			public AggregateParameter 处理中
		    {
				get
		        {
					if(_处理中_W == null)
	        	    {
						_处理中_W = TearOff.处理中;
					}
					return _处理中_W;
				}
			}

			private AggregateParameter _ID_W = null;
			private AggregateParameter _已采_W = null;
			private AggregateParameter _已发_W = null;
			private AggregateParameter _LoginName_W = null;
			private AggregateParameter _Info_W = null;
			private AggregateParameter _Picture_1_W = null;
			private AggregateParameter _LinkName_W = null;
			private AggregateParameter _Postcode_W = null;
			private AggregateParameter _Address_W = null;
			private AggregateParameter _CompaneyName_W = null;
			private AggregateParameter _IndType_W = null;
			private AggregateParameter _Name_W = null;
			private AggregateParameter _Key_W = null;
			private AggregateParameter _StartDate_W = null;
			private AggregateParameter _EndDate_W = null;
			private AggregateParameter _缩略图_W = null;
			private AggregateParameter _PageUrl_W = null;
			private AggregateParameter _处理中_W = null;

			public void AggregateClauseReset()
			{
				_ID_W = null;
				_已采_W = null;
				_已发_W = null;
				_LoginName_W = null;
				_Info_W = null;
				_Picture_1_W = null;
				_LinkName_W = null;
				_Postcode_W = null;
				_Address_W = null;
				_CompaneyName_W = null;
				_IndType_W = null;
				_Name_W = null;
				_Key_W = null;
				_StartDate_W = null;
				_EndDate_W = null;
				_缩略图_W = null;
				_PageUrl_W = null;
				_处理中_W = null;

				this._entity.Query.FlushAggregateParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffAggregateParameter _tearOff;
			
		}
	
		public AggregateClause Aggregate
		{
			get
			{
				if(_aggregateClause == null)
				{
					_aggregateClause = new AggregateClause(this);
				}
		
				return _aggregateClause;
			}
		}
		
		private AggregateClause _aggregateClause = null;	
		#endregion
	
		protected override IDbCommand GetInsertCommand() 
		{
		
			OleDbCommand cmd = new OleDbCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_ContentInsert]";
	
			CreateParameters(cmd);
			    
			return cmd;
		}
	
		protected override IDbCommand GetUpdateCommand()
		{
		
			OleDbCommand cmd = new OleDbCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_ContentUpdate]";
	
			CreateParameters(cmd);
			      
			return cmd;
		}
	
		protected override IDbCommand GetDeleteCommand()
		{
		
			OleDbCommand cmd = new OleDbCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_ContentDelete]";
	
			OleDbParameter p;
			p = cmd.Parameters.Add(Parameters.ID);
			p.SourceColumn = ColumnNames.ID;
			p.SourceVersion = DataRowVersion.Current;

  
			return cmd;
		}
		
		private IDbCommand CreateParameters(OleDbCommand cmd)
		{
			OleDbParameter p;
		
			p = cmd.Parameters.Add(Parameters.ID);
			p.SourceColumn = ColumnNames.ID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.已采);
			p.SourceColumn = ColumnNames.已采;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.已发);
			p.SourceColumn = ColumnNames.已发;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.LoginName);
			p.SourceColumn = ColumnNames.LoginName;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Info);
			p.SourceColumn = ColumnNames.Info;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Picture_1);
			p.SourceColumn = ColumnNames.Picture_1;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.LinkName);
			p.SourceColumn = ColumnNames.LinkName;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Postcode);
			p.SourceColumn = ColumnNames.Postcode;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Address);
			p.SourceColumn = ColumnNames.Address;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.CompaneyName);
			p.SourceColumn = ColumnNames.CompaneyName;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.IndType);
			p.SourceColumn = ColumnNames.IndType;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Name);
			p.SourceColumn = ColumnNames.Name;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Key);
			p.SourceColumn = ColumnNames.Key;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.StartDate);
			p.SourceColumn = ColumnNames.StartDate;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.EndDate);
			p.SourceColumn = ColumnNames.EndDate;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.缩略图);
			p.SourceColumn = ColumnNames.缩略图;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.PageUrl);
			p.SourceColumn = ColumnNames.PageUrl;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.处理中);
			p.SourceColumn = ColumnNames.处理中;
			p.SourceVersion = DataRowVersion.Current;


			return cmd;
		}
	}
}
